import React, { useLayoutEffect } from 'react'
import { useNetwork, useTitle } from 'ahooks'
function useMyTitle( val ) {
  useLayoutEffect(() => {
    document.title = val
  })
}
function App() {
  const netWork = useNetwork()
  // useTitle('哈哈啊哈')
  // useLayoutEffect(() => {
  //   document.title = 'xixixix'
  // })
  useMyTitle('你好世界')
  return (
    <div>
      { JSON.stringify(netWork) }
    </div>
  )
}

export default App
